package DynamicProgramming;

import java.util.Arrays;
import java.util.Scanner;

class Solver1119
{	int u,v;
	int path[];
	
	public void Input()
	{	Scanner in=new Scanner(System.in);
		u=in.nextInt();v=in.nextInt();
		int n=in.nextInt();
		path=new int[n];
		
		for (int i=0;i<n;i++)
		{	int x=in.nextInt(), y=in.nextInt();
			path[i]=x*1000+y;
		}
		Arrays.sort(path);
		in.close();
	}
	public void Solve()
	{	Input();
		int A[],B[],Old[],Cur[];
		
		A=new int[u+1];B=new int[u+1];
		for (int i=0;i<=u;i++)
			A[i]=i;
		Old=A;Cur=B;
		for (int i=1;i<=v;i++)
		{	for (int j=0;j<=u;j++)
			{	int min=Old[j]+1;
				if (j>0)
				{	if (min>Cur[j-1]+1) min=Cur[j-1]+1;
				}
				if (j>0 && Arrays.binarySearch(path, j*1000+i)>=0)
				{	if (min>Old[j-1]+1) min=Old[j-1]+1;
				}
				Cur[j]=min;
			}
			int tmp[]=Cur;Cur=Old;Old=tmp;
		}
		
		Output(Old[u]);
	}
	public void Output(int rs)
	{	int save=u+v-rs;
		rs=(int)((rs-save)*100+Math.round(save*100*Math.sqrt(2)));
		System.out.println(rs);
	}
}
public class P1119
{	public static void main(String[] args)
	{	Solver1119 solver=new Solver1119();
		solver.Solve();
	}
}
